package stock.bean;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * @Document定义在Elasticsearch中索引信息
 * @Id定义了Elasticsearch的_id
 * @Field定义字段类型等信息
 */
@Data
@Document(indexName = "goods",createIndex = true,type="magic")
public class Goods {

    @Id
    @Field
    private Integer goods_id;

    @Field
    private String cover;

    @Field
    private String title;

    @Field
    private Double price;

    @Field
    private Integer platform_id;
}
